{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "d9ff8a46-2be6-420c-bfff-df77a7b47587",
   "metadata": {},
   "source": [
    "# Horizontal and Vertical Facet Labels\n",
    "New `theme()` parameters allow to set the style for horizontal and vertical facet labels separately:\n",
    "\n",
    "- `stripBackgroundX` and `stripBackgroundY` parameters set the background of horizontal and vertical facet labels respectively, specified with `elementRect()`;\n",
    "\n",
    "- `stripTextX` and `stripTextY` - horizontal and vertical facet labels, specified with `elementText()`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "2aef6e9b-8f16-4134-a395-d7fa8ea7f3bb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"qQQTAv\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"library\">\n",
       "       if(!window.letsPlotCallQueue) {\n",
       "           window.letsPlotCallQueue = [];\n",
       "       }; \n",
       "       window.letsPlotCall = function(f) {\n",
       "           window.letsPlotCallQueue.push(f);\n",
       "       };\n",
       "       (function() {\n",
       "           var script = document.createElement(\"script\");\n",
       "           script.type = \"text/javascript\";\n",
       "           script.src = \"https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v4.5.1/js-package/distr/lets-plot.min.js\";\n",
       "           script.onload = function() {\n",
       "               window.letsPlotCall = function(f) {f();};\n",
       "               window.letsPlotCallQueue.forEach(function(f) {f();});\n",
       "               window.letsPlotCallQueue = [];\n",
       "               \n",
       "               \n",
       "           };\n",
       "           script.onerror = function(event) {\n",
       "               window.letsPlotCall = function(f) {};\n",
       "               window.letsPlotCallQueue = [];\n",
       "               var div = document.createElement(\"div\");\n",
       "               div.style.color = 'darkred';\n",
       "               div.textContent = 'Error loading Lets-Plot JS';\n",
       "               document.getElementById(\"qQQTAv\").appendChild(div);\n",
       "           };\n",
       "           var e = document.getElementById(\"qQQTAv\");\n",
       "           e.appendChild(script);\n",
       "       })();\n",
       "   </script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "            <div id=\"kotlin_out_0\"></div>\n",
       "            <script type=\"text/javascript\">\n",
       "                            if(!window.kotlinQueues) {\n",
       "                window.kotlinQueues = {};\n",
       "            }\n",
       "            if(!window.kotlinQueues[\"DataFrame\"]) {\n",
       "                var resQueue = [];\n",
       "                window.kotlinQueues[\"DataFrame\"] = resQueue;\n",
       "                window[\"call_DataFrame\"] = function(f) {\n",
       "                    resQueue.push(f);\n",
       "                }\n",
       "            }\n",
       "            (function (){\n",
       "                var modifiers = [(function(script) {\n",
       "    script.src = \"https://cdn.jsdelivr.net/gh/Kotlin/dataframe@3db46ccccaa1291c0627307d64133317f545e6ae/core/src/main/resources/init.js\"\n",
       "    script.type = \"text/javascript\";\n",
       "})];\n",
       "                var e = document.getElementById(\"kotlin_out_0\");\n",
       "                modifiers.forEach(function (gen) {\n",
       "                    var script = document.createElement(\"script\");\n",
       "                    gen(script)\n",
       "                    script.addEventListener(\"load\", function() {\n",
       "                        window[\"call_DataFrame\"] = function(f) {f();};\n",
       "                        window.kotlinQueues[\"DataFrame\"].forEach(function(f) {f();});\n",
       "                        window.kotlinQueues[\"DataFrame\"] = [];\n",
       "                    }, false);\n",
       "                    script.addEventListener(\"error\", function() {\n",
       "                        window[\"call_DataFrame\"] = function(f) {};\n",
       "                        window.kotlinQueues[\"DataFrame\"] = [];\n",
       "                        var div = document.createElement(\"div\");\n",
       "                        div.style.color = 'darkred';\n",
       "                        div.textContent = 'Error loading resource DataFrame';\n",
       "                        document.getElementById(\"kotlin_out_0\").appendChild(div);\n",
       "                    }, false);\n",
       "                    \n",
       "                    e.appendChild(script);\n",
       "                });\n",
       "            })();\n",
       "            </script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "                <style>\n",
       "                :root {\n",
       "    --background: #fff;\n",
       "    --background-odd: #f5f5f5;\n",
       "    --background-hover: #d9edfd;\n",
       "    --header-text-color: #474747;\n",
       "    --text-color: #848484;\n",
       "    --text-color-dark: #000;\n",
       "    --text-color-medium: #737373;\n",
       "    --text-color-pale: #b3b3b3;\n",
       "    --inner-border-color: #aaa;\n",
       "    --bold-border-color: #000;\n",
       "    --link-color: #296eaa;\n",
       "    --link-color-pale: #296eaa;\n",
       "    --link-hover: #1a466c;\n",
       "}\n",
       "\n",
       ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n",
       "    --background: #303030;\n",
       "    --background-odd: #3c3c3c;\n",
       "    --background-hover: #464646;\n",
       "    --header-text-color: #dddddd;\n",
       "    --text-color: #b3b3b3;\n",
       "    --text-color-dark: #dddddd;\n",
       "    --text-color-medium: #b2b2b2;\n",
       "    --text-color-pale: #737373;\n",
       "    --inner-border-color: #707070;\n",
       "    --bold-border-color: #777777;\n",
       "    --link-color: #008dc0;\n",
       "    --link-color-pale: #97e1fb;\n",
       "    --link-hover: #00688e;\n",
       "}\n",
       "\n",
       "p.dataframe_description {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe {\n",
       "    font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n",
       "    font-size: 12px;\n",
       "    background-color: var(--background);\n",
       "    color: var(--text-color-dark);\n",
       "    border: none;\n",
       "    border-collapse: collapse;\n",
       "}\n",
       "\n",
       "table.dataframe th, td {\n",
       "    padding: 6px;\n",
       "    border: 1px solid transparent;\n",
       "    text-align: left;\n",
       "}\n",
       "\n",
       "table.dataframe th {\n",
       "    background-color: var(--background);\n",
       "    color: var(--header-text-color);\n",
       "}\n",
       "\n",
       "table.dataframe td {\n",
       "    vertical-align: top;\n",
       "}\n",
       "\n",
       "table.dataframe th.bottomBorder {\n",
       "    border-bottom-color: var(--bold-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:nth-child(odd) {\n",
       "    background: var(--background-odd);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:nth-child(even) {\n",
       "    background: var(--background);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:hover {\n",
       "    background: var(--background-hover);\n",
       "}\n",
       "\n",
       "table.dataframe a {\n",
       "    cursor: pointer;\n",
       "    color: var(--link-color);\n",
       "    text-decoration: none;\n",
       "}\n",
       "\n",
       "table.dataframe tr:hover > td a {\n",
       "    color: var(--link-color-pale);\n",
       "}\n",
       "\n",
       "table.dataframe a:hover {\n",
       "    color: var(--link-hover);\n",
       "    text-decoration: underline;\n",
       "}\n",
       "\n",
       "table.dataframe img {\n",
       "    max-width: fit-content;\n",
       "}\n",
       "\n",
       "table.dataframe th.complex {\n",
       "    background-color: var(--background);\n",
       "    border: 1px solid var(--background);\n",
       "}\n",
       "\n",
       "table.dataframe .leftBorder {\n",
       "    border-left-color: var(--inner-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe .rightBorder {\n",
       "    border-right-color: var(--inner-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe .rightAlign {\n",
       "    text-align: right;\n",
       "}\n",
       "\n",
       "table.dataframe .expanderSvg {\n",
       "    width: 8px;\n",
       "    height: 8px;\n",
       "    margin-right: 3px;\n",
       "}\n",
       "\n",
       "table.dataframe .expander {\n",
       "    display: flex;\n",
       "    align-items: center;\n",
       "}\n",
       "\n",
       "/* formatting */\n",
       "\n",
       "table.dataframe .null {\n",
       "    color: var(--text-color-pale);\n",
       "}\n",
       "\n",
       "table.dataframe .structural {\n",
       "    color: var(--text-color-medium);\n",
       "    font-weight: bold;\n",
       "}\n",
       "\n",
       "table.dataframe .dataFrameCaption {\n",
       "    font-weight: bold;\n",
       "}\n",
       "\n",
       "table.dataframe .numbers {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe td:hover .formatted .structural, .null {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe tr:hover .formatted .structural, .null {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "\n",
       "                </style>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%useLatestDescriptors\n",
    "%use lets-plot\n",
    "\n",
    "%use dataframe"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "fad33652-bcfd-41c4-8fe2-670d1651e5ca",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Lets-Plot Kotlin API v.4.9.0. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.5.1."
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LetsPlot.getInfo()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "a8ecf448-aebe-480d-ae4d-b8f39aed0a5b",
   "metadata": {},
   "outputs": [],
   "source": [
    "val df = dataFrameOf(\"animal_type\", \"animal\", \"weight\", \"diet\")(\n",
    "    \"pet\", \"cat\", 5, \"carnivore\",\n",
    "    \"pet\", \"dog\", 10, \"carnivore\",\n",
    "    \"pet\", \"rabbit\", 2, \"herbivore\",\n",
    "    \"pet\", \"hamster\", 1, \"herbivore\",\n",
    "\n",
    "    \"farm\", \"cow\", 500, \"herbivore\",\n",
    "    \"farm\", \"pig\", 100, \"carnivore\",\n",
    "    \"farm\", \"horse\", 700, \"herbivore\",\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "7ffdc8df-85dc-4c7b-bdb9-c5734e7f22cc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"5kf1CB\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"5kf1CB\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"mapping\":{\n",
       "\"x\":\"animal\",\n",
       "\"y\":\"weight\"\n",
       "},\n",
       "\"data\":{\n",
       "\"animal\":[\"cat\",\"dog\",\"rabbit\",\"hamster\",\"cow\",\"pig\",\"horse\"],\n",
       "\"weight\":[5.0,10.0,2.0,1.0,500.0,100.0,700.0],\n",
       "\"diet\":[\"carnivore\",\"carnivore\",\"herbivore\",\"herbivore\",\"herbivore\",\"carnivore\",\"herbivore\"],\n",
       "\"animal_type\":[\"pet\",\"pet\",\"pet\",\"pet\",\"farm\",\"farm\",\"farm\"]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"position\":\"stack\",\n",
       "\"geom\":\"bar\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"name\":\"bw\"\n",
       "},\n",
       "\"facet\":{\n",
       "\"scales\":\"free\",\n",
       "\"y_order\":1.0,\n",
       "\"name\":\"grid\",\n",
       "\"x\":\"animal_type\",\n",
       "\"y\":\"diet\",\n",
       "\"x_order\":1.0\n",
       "},\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"animal_type\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"animal\"\n",
       "},{\n",
       "\"type\":\"int\",\n",
       "\"column\":\"weight\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"diet\"\n",
       "}]\n",
       "},\n",
       "\"spec_id\":\"1\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val p = letsPlot(df.toMap()) { x = \"animal\"; y = \"weight\" } +\n",
    "    geomBar(stat = Stat.identity) +\n",
    "    facetGrid(x = \"animal_type\", y = \"diet\", scales = \"free\") +\n",
    "    themeBW()\n",
    "\n",
    "p"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c4b03b06-6ddb-45b3-ad4e-8c8cbaad5a4c",
   "metadata": {},
   "source": [
    "Change the style for facet labels:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "3d27e4d9-f648-4c03-85dc-33979bc4eeb2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"oXAoGc\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"oXAoGc\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"mapping\":{\n",
       "\"x\":\"animal\",\n",
       "\"y\":\"weight\"\n",
       "},\n",
       "\"data\":{\n",
       "\"animal\":[\"cat\",\"dog\",\"rabbit\",\"hamster\",\"cow\",\"pig\",\"horse\"],\n",
       "\"weight\":[5.0,10.0,2.0,1.0,500.0,100.0,700.0],\n",
       "\"diet\":[\"carnivore\",\"carnivore\",\"herbivore\",\"herbivore\",\"herbivore\",\"carnivore\",\"herbivore\"],\n",
       "\"animal_type\":[\"pet\",\"pet\",\"pet\",\"pet\",\"farm\",\"farm\",\"farm\"]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"position\":\"stack\",\n",
       "\"geom\":\"bar\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"name\":\"bw\",\n",
       "\"strip_background_y\":{\n",
       "\"fill\":\"light_blue\",\n",
       "\"blank\":false\n",
       "},\n",
       "\"strip_text_x\":{\n",
       "\"face\":\"bold\",\n",
       "\"blank\":false\n",
       "},\n",
       "\"strip_background_x\":{\n",
       "\"fill\":\"pink\",\n",
       "\"blank\":false\n",
       "},\n",
       "\"strip_text_y\":{\n",
       "\"face\":\"italic\",\n",
       "\"blank\":false\n",
       "}\n",
       "},\n",
       "\"facet\":{\n",
       "\"scales\":\"free\",\n",
       "\"y_order\":1.0,\n",
       "\"name\":\"grid\",\n",
       "\"x\":\"animal_type\",\n",
       "\"y\":\"diet\",\n",
       "\"x_order\":1.0\n",
       "},\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"animal_type\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"animal\"\n",
       "},{\n",
       "\"type\":\"int\",\n",
       "\"column\":\"weight\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"diet\"\n",
       "}]\n",
       "},\n",
       "\"spec_id\":\"2\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p + theme(stripTextX = elementText(face = \"bold\"),\n",
    "          stripBackgroundX = elementRect(fill = \"pink\"),\n",
    "          stripTextY = elementText(face = \"italic\"),\n",
    "          stripBackgroundY = elementRect(fill = \"light_blue\"))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "957baf07-7e3b-4dbb-93c6-3e7858c48e36",
   "metadata": {},
   "source": [
    "Hide horizontal facet labels:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "57bf5c50-7728-4805-91fb-7dcfd6380b2c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"dYWJlr\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"dYWJlr\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"mapping\":{\n",
       "\"x\":\"animal\",\n",
       "\"y\":\"weight\"\n",
       "},\n",
       "\"data\":{\n",
       "\"animal\":[\"cat\",\"dog\",\"rabbit\",\"hamster\",\"cow\",\"pig\",\"horse\"],\n",
       "\"weight\":[5.0,10.0,2.0,1.0,500.0,100.0,700.0],\n",
       "\"diet\":[\"carnivore\",\"carnivore\",\"herbivore\",\"herbivore\",\"herbivore\",\"carnivore\",\"herbivore\"],\n",
       "\"animal_type\":[\"pet\",\"pet\",\"pet\",\"pet\",\"farm\",\"farm\",\"farm\"]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"position\":\"stack\",\n",
       "\"geom\":\"bar\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"name\":\"bw\",\n",
       "\"strip_text_x\":{\n",
       "\"blank\":true\n",
       "}\n",
       "},\n",
       "\"facet\":{\n",
       "\"scales\":\"free\",\n",
       "\"y_order\":1.0,\n",
       "\"name\":\"grid\",\n",
       "\"x\":\"animal_type\",\n",
       "\"y\":\"diet\",\n",
       "\"x_order\":1.0\n",
       "},\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"animal_type\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"animal\"\n",
       "},{\n",
       "\"type\":\"int\",\n",
       "\"column\":\"weight\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"diet\"\n",
       "}]\n",
       "},\n",
       "\"spec_id\":\"3\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p + theme(stripTextX = elementBlank())"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Kotlin",
   "language": "kotlin",
   "name": "kotlin"
  },
  "language_info": {
   "codemirror_mode": "text/x-kotlin",
   "file_extension": ".kt",
   "mimetype": "text/x-kotlin",
   "name": "kotlin",
   "nbconvert_exporter": "",
   "pygments_lexer": "kotlin",
   "version": "1.9.23"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
